<!DOCTYPE html>
<html>
<head>
    <title>WebRTC Camera Stream</title>
</head>
<body>
    <video id="video" playsinline autoplay></video>
    <script>
        if ('mediaDevices' in navigator && navigator.mediaDevices.getUserMedia) {
            const constraints = {
                video: true,
                audio: false,
            };
            navigator.mediaDevices.getUserMedia(constraints).then((stream) => {
                const videoElement = document.getElementById('video');
                videoElement.srcObject = stream;
            }).catch((error) => {
                console.error('Error accessing media devices.', error);
            });
        } else {
            alert('getUserMedia not supported in this browser.');
        }
    </script>
</body>
</html>
